package com.zjpavt.client.page.basepage;

import com.zjpavt.client.enums.KeyCodeEnum;
import com.zjpavt.client.page.abstractpage.AbstractMultiPage;
import com.zjpavt.client.page.intefacepage.BasePage;
import com.zjpavt.client.page.intefacepage.OwnerPage;

/**
 * 动态变化的数量的页面
 * 持有该对象必须覆盖相关方法
 * @author zyc
 */
public class UnknownPageSizeMultiPage extends AbstractMultiPage implements OwnerPage {

    /**
     * 持有者对象
     */
    private BasePage ownerPage;

    /**
     * @param basePage
     */
    public UnknownPageSizeMultiPage(BasePage basePage, int pageNum) {
        super(pageNum);
        this.ownerPage = basePage;

    }

    @Override
    public BasePage getOwnerPage() {
        return ownerPage;
    }

    @Override
    public int getPageSize() {
        return getOwnerPage().getPageNum();
    }

    @Override
    public int getPageNum() {
        return getOwnerPage().getPageNum();
    }

    @Override
    public void refreshPage() {
        getOwnerPage().refreshPage();
    }

}
